
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Introduction · 《Terraform入门教程》</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="大可不加冰">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism-vsc-dark-plus.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-image-captions/image-captions.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="1.Terraform初步体验.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter active" data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                        <b>1.1.</b>
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="1.Terraform初步体验.html">
            
                <a href="1.Terraform初步体验.html">
            
                    
                        <b>1.2.</b>
                    
                    Terraform 初步体验
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                        <b>1.3.</b>
                    
                    Terraform基础概念
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="2.1.Terraform基础概念——Provider.html">
            
                <a href="2.1.Terraform基础概念——Provider.html">
            
                    
                        <b>1.3.1.</b>
                    
                    Provider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="2.2.Terraform基础概念——状态管理.html">
            
                <a href="2.2.Terraform基础概念——状态管理.html">
            
                    
                        <b>1.3.2.</b>
                    
                    状态管理
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="3.Terraform代码的书写.html">
            
                <a href="3.Terraform代码的书写.html">
            
                    
                        <b>1.4.</b>
                    
                    Terraform 代码的书写
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="3.1.类型.html">
            
                <a href="3.1.类型.html">
            
                    
                        <b>1.4.1.</b>
                    
                    类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="3.2.配置语法.html">
            
                <a href="3.2.配置语法.html">
            
                    
                        <b>1.4.2.</b>
                    
                    配置语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="3.3.输入变量.html">
            
                <a href="3.3.输入变量.html">
            
                    
                        <b>1.4.3.</b>
                    
                    输入变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="3.4.输出值.html">
            
                <a href="3.4.输出值.html">
            
                    
                        <b>1.4.4.</b>
                    
                    输出值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="3.5.局部值.html">
            
                <a href="3.5.局部值.html">
            
                    
                        <b>1.4.5.</b>
                    
                    局部值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="3.6.资源.html">
            
                <a href="3.6.资源.html">
            
                    
                        <b>1.4.6.</b>
                    
                    资源
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="3.7.数据源.html">
            
                <a href="3.7.数据源.html">
            
                    
                        <b>1.4.7.</b>
                    
                    数据源
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="3.8.表达式.html">
            
                <a href="3.8.表达式.html">
            
                    
                        <b>1.4.8.</b>
                    
                    表达式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="3.9.重载文件.html">
            
                <a href="3.9.重载文件.html">
            
                    
                        <b>1.4.9.</b>
                    
                    重载文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="3.10.代码风格规范.html">
            
                <a href="3.10.代码风格规范.html">
            
                    
                        <b>1.4.10.</b>
                    
                    代码风格规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11" data-path="3.11.checks.html">
            
                <a href="3.11.checks.html">
            
                    
                        <b>1.4.11.</b>
                    
                    Checks
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="4.Terraform模块.html">
            
                <a href="4.Terraform模块.html">
            
                    
                        <b>1.5.</b>
                    
                    Terraform 模块
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="4.1.创建模块.html">
            
                <a href="4.1.创建模块.html">
            
                    
                        <b>1.5.1.</b>
                    
                    创建模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="4.2.使用模块.html">
            
                <a href="4.2.使用模块.html">
            
                    
                        <b>1.5.2.</b>
                    
                    使用模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="4.3.模块元参数.html">
            
                <a href="4.3.模块元参数.html">
            
                    
                        <b>1.5.3.</b>
                    
                    模块元参数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="4.4.重构.html">
            
                <a href="4.4.重构.html">
            
                    
                        <b>1.5.4.</b>
                    
                    重构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="4.5.设计新模块的模式.html">
            
                <a href="4.5.设计新模块的模式.html">
            
                    
                        <b>1.5.5.</b>
                    
                    设计新模块的模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="5.Terraform命令行.html">
            
                <a href="5.Terraform命令行.html">
            
                    
                        <b>1.6.</b>
                    
                    Terraform 命令行
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="5.1.命令行配置文件.html">
            
                <a href="5.1.命令行配置文件.html">
            
                    
                        <b>1.6.1.</b>
                    
                    命令行配置文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="5.2.环境变量.html">
            
                <a href="5.2.环境变量.html">
            
                    
                        <b>1.6.2.</b>
                    
                    环境变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="5.3.资源地址.html">
            
                <a href="5.3.资源地址.html">
            
                    
                        <b>1.6.3.</b>
                    
                    资源地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="5.4.apply.html">
            
                <a href="5.4.apply.html">
            
                    
                        <b>1.6.4.</b>
                    
                    apply
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="5.5.console.html">
            
                <a href="5.5.console.html">
            
                    
                        <b>1.6.5.</b>
                    
                    console
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="5.6.destroy.html">
            
                <a href="5.6.destroy.html">
            
                    
                        <b>1.6.6.</b>
                    
                    destroy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="5.7.fmt.html">
            
                <a href="5.7.fmt.html">
            
                    
                        <b>1.6.7.</b>
                    
                    fmt
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="5.8.force-unlock.html">
            
                <a href="5.8.force-unlock.html">
            
                    
                        <b>1.6.8.</b>
                    
                    force-unlock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="5.9.get.html">
            
                <a href="5.9.get.html">
            
                    
                        <b>1.6.9.</b>
                    
                    get
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10" data-path="5.10.graph.html">
            
                <a href="5.10.graph.html">
            
                    
                        <b>1.6.10.</b>
                    
                    graph
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11" data-path="5.11.import.html">
            
                <a href="5.11.import.html">
            
                    
                        <b>1.6.11.</b>
                    
                    import
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.12" data-path="5.12.init.html">
            
                <a href="5.12.init.html">
            
                    
                        <b>1.6.12.</b>
                    
                    init
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.13" data-path="5.13.output.html">
            
                <a href="5.13.output.html">
            
                    
                        <b>1.6.13.</b>
                    
                    output
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.14" data-path="5.14.plan.html">
            
                <a href="5.14.plan.html">
            
                    
                        <b>1.6.14.</b>
                    
                    plan
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.15" data-path="5.15.providers.html">
            
                <a href="5.15.providers.html">
            
                    
                        <b>1.6.15.</b>
                    
                    providers
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.15.1" data-path="5.15.1.mirror.html">
            
                <a href="5.15.1.mirror.html">
            
                    
                        <b>1.6.15.1.</b>
                    
                    mirror
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.15.2" data-path="5.15.2.schema.html">
            
                <a href="5.15.2.schema.html">
            
                    
                        <b>1.6.15.2.</b>
                    
                    schema
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.16" data-path="5.16.refresh.html">
            
                <a href="5.16.refresh.html">
            
                    
                        <b>1.6.16.</b>
                    
                    refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.17" data-path="5.17.show.html">
            
                <a href="5.17.show.html">
            
                    
                        <b>1.6.17.</b>
                    
                    show
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.18" data-path="5.18.state.html">
            
                <a href="5.18.state.html">
            
                    
                        <b>1.6.18.</b>
                    
                    state
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.18.1" data-path="5.18.1.list.html">
            
                <a href="5.18.1.list.html">
            
                    
                        <b>1.6.18.1.</b>
                    
                    list
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.18.2" data-path="5.18.2.mv.html">
            
                <a href="5.18.2.mv.html">
            
                    
                        <b>1.6.18.2.</b>
                    
                    mv
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.18.3" data-path="5.18.3.pull.html">
            
                <a href="5.18.3.pull.html">
            
                    
                        <b>1.6.18.3.</b>
                    
                    pull
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.18.4" data-path="5.18.4.push.html">
            
                <a href="5.18.4.push.html">
            
                    
                        <b>1.6.18.4.</b>
                    
                    push
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.18.5" data-path="5.18.5.replace-provider.html">
            
                <a href="5.18.5.replace-provider.html">
            
                    
                        <b>1.6.18.5.</b>
                    
                    replace-provider
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.18.6" data-path="5.18.6.rm.html">
            
                <a href="5.18.6.rm.html">
            
                    
                        <b>1.6.18.6.</b>
                    
                    rm
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.18.7" data-path="5.18.7.show.html">
            
                <a href="5.18.7.show.html">
            
                    
                        <b>1.6.18.7.</b>
                    
                    show
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.19" data-path="5.19.taint.html">
            
                <a href="5.19.taint.html">
            
                    
                        <b>1.6.19.</b>
                    
                    taint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.20" data-path="5.20.validate.html">
            
                <a href="5.20.validate.html">
            
                    
                        <b>1.6.20.</b>
                    
                    validate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.21" data-path="5.21.untaint.html">
            
                <a href="5.21.untaint.html">
            
                    
                        <b>1.6.21.</b>
                    
                    untaint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.22" data-path="5.22.workspace.html">
            
                <a href="5.22.workspace.html">
            
                    
                        <b>1.6.22.</b>
                    
                    workspace
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.22.1" data-path="5.22.1.list.html">
            
                <a href="5.22.1.list.html">
            
                    
                        <b>1.6.22.1.</b>
                    
                    list
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.22.2" data-path="5.22.2.select.html">
            
                <a href="5.22.2.select.html">
            
                    
                        <b>1.6.22.2.</b>
                    
                    select
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.22.3" data-path="5.22.3.new.html">
            
                <a href="5.22.3.new.html">
            
                    
                        <b>1.6.22.3.</b>
                    
                    new
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.22.4" data-path="5.22.4.delete.html">
            
                <a href="5.22.4.delete.html">
            
                    
                        <b>1.6.22.4.</b>
                    
                    delete
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.22.5" data-path="5.22.5.show.html">
            
                <a href="5.22.5.show.html">
            
                    
                        <b>1.6.22.5.</b>
                    
                    show
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="6.test.html">
            
                <a href="6.test.html">
            
                    
                        <b>1.7.</b>
                    
                    Terraform Test
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="7.Aha——会心一击.html">
            
                <a href="7.Aha——会心一击.html">
            
                    
                        <b>1.8.</b>
                    
                    Aha——会心一击
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="7.1.有条件创建.html">
            
                <a href="7.1.有条件创建.html">
            
                    
                        <b>1.8.1.</b>
                    
                    有条件创建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="7.2.依赖反转.html">
            
                <a href="7.2.依赖反转.html">
            
                    
                        <b>1.8.2.</b>
                    
                    依赖反转
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="7.3.多可用区分布.html">
            
                <a href="7.3.多可用区分布.html">
            
                    
                        <b>1.8.3.</b>
                    
                    多可用区分布
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="7.4.provisioner与user_data.html">
            
                <a href="7.4.provisioner与user_data.html">
            
                    
                        <b>1.8.4.</b>
                    
                    provisioner与user_data
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.5" data-path="7.5.destroy-provisioner中使用变量.html">
            
                <a href="7.5.destroy-provisioner中使用变量.html">
            
                    
                        <b>1.8.5.</b>
                    
                    destroy-provisioner中使用变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.6" data-path="7.6.利用null_resource的triggers触发其他资源更新.html">
            
                <a href="7.6.利用null_resource的triggers触发其他资源更新.html">
            
                    
                        <b>1.8.6.</b>
                    
                    利用null_resource的triggers触发其他资源更新
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.7" data-path="7.7.利用null_resource搭配replace_triggered_by更新无法读取的属性.html">
            
                <a href="7.7.利用null_resource搭配replace_triggered_by更新无法读取的属性.html">
            
                    
                        <b>1.8.7.</b>
                    
                    利用 null_resource 搭配 replace_triggered_by 更新无法从服务端读取内容的属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.8" data-path="7.8.创建资源的条件依赖另一个资源的输出时怎么办.html">
            
                <a href="7.8.创建资源的条件依赖另一个资源的输出时怎么办.html">
            
                    
                        <b>1.8.8.</b>
                    
                    创建资源的条件依赖另一个资源的输出时怎么办
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.9" data-path="7.9.利用create_before_destroy调整资源update执行的顺序.html">
            
                <a href="7.9.利用create_before_destroy调整资源update执行的顺序.html">
            
                    
                        <b>1.8.9.</b>
                    
                    利用 create_before_destroy 调整资源 Update 的执行顺序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.10" data-path="7.10.terraform与自动化.html">
            
                <a href="7.10.terraform与自动化.html">
            
                    
                        <b>1.8.10.</b>
                    
                    Terraform 与自动化
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="8.CloudPosse最佳实践.html">
            
                <a href="8.CloudPosse最佳实践.html">
            
                    
                        <b>1.9.</b>
                    
                    来自CloudPosse的Terraform最佳实践
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="9.后记.html">
            
                <a href="9.后记.html">
            
                    
                        <b>1.10.</b>
                    
                    后记
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >Introduction</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#&#x524D;&#x8A00;"><b>1.1.1. </b>&#x524D;&#x8A00;</a></li><ul><li><span class="title-icon "></span><a href="#2024-06-23-&#x7B2C;&#x4E8C;&#x7248;&#x66F4;&#x65B0;&#x58F0;&#x660E;"><b>1.1.1.1. </b>2024-06-23 &#x7B2C;&#x4E8C;&#x7248;&#x66F4;&#x65B0;&#x58F0;&#x660E;</a></li><li><span class="title-icon "></span><a href="#2022-07-17-&#x9A6C;&#x9A70;&#x6392;&#x9664;&#x6761;&#x6B3E;"><b>1.1.1.2. </b>2022-07-17 &#x9A6C;&#x9A70;&#x6392;&#x9664;&#x6761;&#x6B3E;</a></li></ul></ul></div><a href="#&#x524D;&#x8A00;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="&#x524D;&#x8A00;"><a name="&#x524D;&#x8A00;" class="anchor-navigation-ex-anchor" href="#&#x524D;&#x8A00;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.1. &#x524D;&#x8A00;</h1>
<p>&#x5F88;&#x591A;&#x5E74;&#x4EE5;&#x524D;&#x53C2;&#x52A0;&#x8FC7;&#x4E00;&#x6B21; AWS AWSome Day&#xFF0C;&#x90A3;&#x662F;&#x4E00;&#x79CD; AWS &#x5728;&#x5168;&#x7403;&#x5404;&#x5927;&#x57CE;&#x5E02;&#x5DE1;&#x56DE;&#x4E3E;&#x529E;&#x7684;&#x514D;&#x8D39;&#x7684;&#x6280;&#x672F;&#x7814;&#x8BA8;&#x4F1A;&#xFF0C;&#x65F6;&#x957F;&#x4E00;&#x5929;&#xFF0C;&#x4E3A;&#x521D;&#x6B21;&#x63A5;&#x89E6;AWS&#x5927;&#x4F1A;&#x7684;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x3001;IT &#x6280;&#x672F;&#x4EBA;&#x5458;&#x4EE5;&#x53CA;&#x4F01;&#x4E1A;&#x6280;&#x672F;&#x9886;&#x57DF;&#x7684;&#x51B3;&#x7B56;&#x8005;&#x63D0;&#x4F9B;&#x5165;&#x95E8;&#x7EA7;&#x7684; AWS &#x4EA7;&#x54C1;&#x4ECB;&#x7ECD;&#x3002;&#x5728;&#x90A3;&#x6B21; AWSome Day &#x4E2D;&#xFF0C;&#x6211;&#x7B2C;&#x4E00;&#x6B21;&#x63A5;&#x89E6;&#x5230;&#x4E86;&#x73B0;&#x5728;&#x516C;&#x6709;&#x4E91;&#x91CC;&#x90A3;&#x4E9B;&#x8033;&#x719F;&#x80FD;&#x8BE6;&#x7684;&#x6982;&#x5FF5;&#xFF0C;&#x6BD4;&#x5982; Region&#x3001;Availability Zone&#x3001;Auto Scaling Group&#x3001;RDS &#x8FD9;&#x4E9B;&#x7ECF;&#x5178;&#x4EA7;&#x54C1;&#x3002;</p>
<p>&#x6700;&#x8BA9;&#x6211;&#x89C9;&#x5F97;&#x60CA;&#x5947;&#x7684;&#x662F;&#xFF0C;&#x57F9;&#x8BAD;&#x5E08;&#x73B0;&#x573A;&#x6F14;&#x793A;&#x4E86;&#x4E00;&#x79CD;&#x540D;&#x4E3A; CloudFormation &#x7684;&#x4EA7;&#x54C1;&#xFF0C;&#x7528;&#x57F9;&#x8BAD;&#x5E08;&#x7684;&#x8BDD;&#x8BF4;&#x5C31;&#x662F;&#x201C;&#x6492;&#x8C46;&#x6210;&#x5175;&#x201D;&#xFF0C;&#x901A;&#x8FC7;&#x7F16;&#x5199;&#x4E00;&#x4E9B; JSON &#x5C31;&#x53EF;&#x4EE5;&#x6279;&#x91CF;&#x53CD;&#x590D;&#x521B;&#x5EFA;&#x4E00;&#x6279;&#x4E91;&#x7AEF;&#x8D44;&#x6E90;&#xFF0C;&#x4F8B;&#x5982; AWS &#x5B98;&#x65B9;&#x63D0;&#x4F9B;&#x7684;&#x4E00;&#x4E2A; <a href="https://aws.amazon.com/cn/cloudformation/getting-started/" target="_blank">CloudFormation &#x4F8B;&#x5B50;</a>&#xFF1A;</p>
<pre class="language-"><code class="lang-json"><span class="token punctuation">{</span>

    <span class="token property">&quot;Description&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;Create an EC2 instance running the Amazon Linux 32 bit AMI.&quot;</span><span class="token punctuation">,</span>

    <span class="token property">&quot;Parameters&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>

        <span class="token property">&quot;KeyPair&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>

            <span class="token property">&quot;Description&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;The EC2 Key Pair to allow SSH access to the instance&quot;</span><span class="token punctuation">,</span>

            <span class="token property">&quot;Type&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;String&quot;</span>

        <span class="token punctuation">}</span>

    <span class="token punctuation">}</span><span class="token punctuation">,</span>

    <span class="token property">&quot;Resources&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>

        <span class="token property">&quot;Ec2Instance&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>

            <span class="token property">&quot;Type&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;AWS::EC2::Instance&quot;</span><span class="token punctuation">,</span>

            <span class="token property">&quot;Properties&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>

                <span class="token property">&quot;KeyName&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span> <span class="token property">&quot;Ref&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;KeyPair&quot;</span> <span class="token punctuation">}</span><span class="token punctuation">,</span>

                <span class="token property">&quot;ImageId&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;ami-3b355a52&quot;</span>

            <span class="token punctuation">}</span>

        <span class="token punctuation">}</span>

    <span class="token punctuation">}</span><span class="token punctuation">,</span>

    <span class="token property">&quot;Outputs&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>

        <span class="token property">&quot;InstanceId&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>

            <span class="token property">&quot;Description&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;The InstanceId of the newly created EC2 instance&quot;</span><span class="token punctuation">,</span>

            <span class="token property">&quot;Value&quot;</span> <span class="token operator">:</span> <span class="token punctuation">{</span>

                <span class="token property">&quot;Ref&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;Ec2Instance&quot;</span>

            <span class="token punctuation">}</span>

        <span class="token punctuation">}</span>

    <span class="token punctuation">}</span><span class="token punctuation">,</span>

    <span class="token property">&quot;AWSTemplateFormatVersion&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;2010-09-09&quot;</span>

<span class="token punctuation">}</span>
</code></pre>
<p>&#x8FD9;&#x6837;&#x4E00;&#x6BB5;&#x7B80;&#x5355;&#x7684; JSON&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x8BA9;&#x6211;&#x4EEC;&#x7528;&#x6307;&#x5B9A;&#x7684;&#x955C;&#x50CF; id &#x521B;&#x5EFA;&#x4E00;&#x53F0;&#x4E91;&#x7AEF;&#x865A;&#x62DF;&#x673A;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x5728;&#x754C;&#x9762;&#x4E0A;&#x70B9;&#x70B9;&#x70B9;&#x3002;&#x8981;&#x77E5;&#x9053;&#x5728;&#x5F53;&#x65F6;&#xFF0C;&#x6211;&#x6B63;&#x5728;&#x4E00;&#x5BB6;&#x521D;&#x521B;&#x516C;&#x53F8;&#x5DE5;&#x4F5C;&#xFF0C;&#x540C;&#x65F6;&#x8EAB;&#x517C;&#x67B6;&#x6784;&#x5E08;&#x3001;&#x540E;&#x53F0;&#x5F00;&#x53D1;&#x7A0B;&#x5E8F;&#x5458;&#x3001;DBA &#x4EE5;&#x53CA;&#x8FD0;&#x7EF4;&#x6570;&#x804C;&#xFF0C;&#x8981;&#x7EF4;&#x62A4;&#x6D4B;&#x8BD5;&#x3001;&#x9884;&#x53D1;&#x5E03;&#x4EE5;&#x53CA;&#x751F;&#x4EA7;&#x4E09;&#x5957;&#x73AF;&#x5883;&#xFF0C;&#x65F6;&#x4E0D;&#x65F6;&#x8FD8;&#x56E0;&#x4E3A;&#x8981;&#x53BB;&#x4FEE;&#x590D;&#x56E0;&#x73AF;&#x5883;&#x4E4B;&#x95F4;&#x914D;&#x7F6E;&#x4E0D;&#x4E00;&#x81F4;&#x800C;&#x5F15;&#x53D1;&#x7684;&#x79CD;&#x79CD;&#x9519;&#x8BEF;&#x800C;&#x7126;&#x5934;&#x70C2;&#x989D;&#xFF0C;&#x90A3;&#x65F6;&#x7684;&#x6211;&#x5C31;&#x5F88;&#x671F;&#x5F85; CloudFormation &#x80FD;&#x591F;&#x7ED9;&#x4E88;&#x6211;&#x8FD9;&#x79CD;&#x80FD;&#x591F;&#x6279;&#x91CF;&#x521B;&#x5EFA;&#x5E76;&#x7BA1;&#x7406;&quot;&#x62DB;&#x4E4B;&#x80FD;&#x6765;&#xFF0C;&#x6765;&#x4E4B;&#x80FD;&#x6218;&#xFF0C;&#x6218;&#x4E4B;&#x80FD;&#x80DC;&#xFF0C;&#x80DC;&#x4E4B;&#x80FD;&#x53BB;&quot;&#x7684;&#x73AF;&#x5883;&#x7684;&#x80FD;&#x529B;&#x3002;&#x4F46;&#x5F88;&#x53EF;&#x60DC;&#xFF0C;CloudFormation &#x662F; AWS &#x72EC;&#x5BB6;&#x62E5;&#x6709;&#x7684;&#x80FD;&#x529B;&#xFF0C;&#x800C;&#x90A3;&#x65F6;&#x7684; AWS &#x4EF7;&#x683C;&#x5BF9;&#x6211;&#x4EEC;&#x6765;&#x8BF4;&#x592A;&#x8D35;&#x4E86;&#xFF0C;&#x4E2D;&#x56FD;&#x533A;&#x7684;&#x4EA7;&#x54C1;&#x4E5F;&#x975E;&#x5E38;&#x5C11;&#xFF0C;&#x6240;&#x4EE5;&#x8FD9;&#x4E2A;&#x68A6;&#x60F3;&#x4E5F;&#x5C31;&#x4E0D;&#x4E86;&#x4E86;&#x4E4B;&#x4E86;&#xFF0C;&#x4F46;&#x662F; CloudFormation &#x7684;&#x90A3;&#x79CD;&#x9AD8;&#x5EA6;&#x6807;&#x51C6;&#x5316;&#x4E0E;&#x81EA;&#x52A8;&#x5316;&#x7ED9;&#x6211;&#x5E26;&#x6765;&#x7684;&#x51B2;&#x51FB;&#x4E00;&#x76F4;&#x6325;&#x4E4B;&#x4E0D;&#x53BB;&#x3002;</p>
<p>&#x6211;&#x5F53;&#x65F6;&#x5E76;&#x4E0D;&#x77E5;&#x9053;&#x5728;&#x897F;&#x96C5;&#x56FE;&#x7684;&#x534E;&#x76DB;&#x987F;&#x5927;&#x5B66;&#xFF0C;&#x6709;&#x4E00;&#x4E2A;&#x7F8E;&#x65E5;&#x6DF7;&#x8840;&#x5927;&#x5E05;&#x54E5; Mitchell Hashimoto &#x548C;&#x4ED6;&#x7684;&#x8001;&#x677F; Armon Dagar &#x4E5F;&#x6DF1;&#x6DF1;&#x6C89;&#x8FF7;&#x4E8E; CloudFormation &#x6240;&#x5E26;&#x6765;&#x7684;&#x90A3;&#x79CD;&#x4F18;&#x96C5;&#x4E0E;&#x9AD8;&#x6548;&#xFF0C;&#x540C;&#x65F6;&#x4ED6;&#x4EEC;&#x4E5F;&#x5728;&#x5934;&#x75BC; CloudFormation &#x672C;&#x8EAB;&#x7684;&#x4E00;&#x7CFB;&#x5217;&#x95EE;&#x9898;&#xFF0C;&#x6700;&#x4E3B;&#x8981;&#x7684;&#x5C31;&#x662F;&#x5B83;&#x662F; AWS &#x72EC;&#x5360;&#x7684;&#x3002;&#x5F3A;&#x4EBA;&#x548C;&#x6211;&#x8FD9;&#x79CD;&#x5EB8;&#x4EBA;&#x6700;&#x5927;&#x7684;&#x533A;&#x522B;&#x5C31;&#x662F;&#xFF0C;&#x5F3A;&#x4EBA;&#x6709;&#x4E86;&#x60F3;&#x6CD5;&#x76F4;&#x63A5;&#x5C31;&#x53BB;&#x505A;&#xFF0C;Mitchell &#x548C; Armon &#x5728;&#x8BA8;&#x8BBA;&#x4E2D;&#x6E10;&#x6E10;&#x6709;&#x4E86;&#x4E00;&#x4E2A;&#x60F3;&#x6CD5;&#x2014;&#x2014;&#x6253;&#x9020;&#x4E00;&#x4E2A;&#x591A;&#x4E91;(Multi-Cloud)&#x7684;&#x5F00;&#x6E90;&#x7684;&#x57FA;&#x7840;&#x8BBE;&#x65BD;&#x5373;&#x4EE3;&#x7801;(IaC)&#x5DE5;&#x5177;&#xFF0C;&#x5E76;&#x4E14;&#x8981;&#x8D85;&#x8D8A; CloudFormation&#x3002;&#x4ED6;&#x4EEC;&#x7EC4;&#x5EFA;&#x4E86;&#x4E00;&#x5BB6;&#x540D;&#x4E3A; HashiCorp &#x7684;&#x516C;&#x53F8;&#x6765;&#x5B9E;&#x73B0;&#x8FD9;&#x4E2A;&#x76EE;&#x6807;&#x3002;</p>
<p>&#x5728;&#x4ECA;&#x5E74;3&#x6708;&#xFF0C;HashiCorp &#x5BA3;&#x5E03;&#x6210;&#x529F;&#x83B7;&#x5F97; 1.75 &#x4EBF;&#x7F8E;&#x5143;&#x7684;E&#x8F6E;&#x878D;&#x8D44;&#xFF0C;&#x6295;&#x540E;&#x516C;&#x53F8;&#x4F30;&#x503C; 51 &#x4EBF;&#x7F8E;&#x5143;&#x3002;HashiCorp &#x7684;&#x4EA7;&#x54C1;&#x7EBF;&#x4E3B;&#x8981;&#x6709; Nomad&#x3001;Consul&#x3001;Valut &#x4EE5;&#x53CA; Terraform&#xFF0C;&#x53E6;&#x5916;&#x8FD8;&#x6709; Vagrant &#x4EE5;&#x53CA; Packer &#x4E24;&#x4E2A;&#x5F00;&#x6E90;&#x5DE5;&#x5177;&#xFF0C;2020 &#x5E74;&#x8FD8;&#x63A8;&#x51FA;&#x4E86; Boundary &#x4EE5;&#x53CA; Waypoint &#x4E24;&#x4E2A;&#x65B0;&#x4EA7;&#x54C1;&#x3002;</p>
<figure id="fig1.1.1"><img src="https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-11-13/1605243540985-image.png" alt="Nomad&#x3001;Consul&#x3001;Vault&#x3001;Terraform &#x7EC4;&#x6210;&#x7684; HashiStack"><figcaption>&#x56FE; 1.1/1 - Nomad&#x3001;Consul&#x3001;Vault&#x3001;Terraform &#x7EC4;&#x6210;&#x7684; HashiStack</figcaption></figure>
<p>HashiCorp &#x7684;&#x4EA7;&#x54C1;&#x7EBF;&#x4E3B;&#x8981;&#x662F;&#x7531; Nomad&#x3001;Consul&#x3001;Vault&#x3001;Terraform &#x7EC4;&#x6210;&#x7684; HashiStack&#xFF0C;Terraform &#x626E;&#x6F14;&#x4E86;&#x627F;&#x8F7D;&#x6574;&#x4E2A; HashiStack &#x7684;&#x5173;&#x952E;&#x89D2;&#x8272;&#xFF0C;&#x8D1F;&#x8D23;&#x5728;&#x4E0D;&#x540C;&#x7684;&#x4E91;&#x5E73;&#x53F0;&#x4E4B;&#x4E0A;&#x521B;&#x5EFA;&#x51FA;&#x4E00;&#x81F4;&#x7684;&#x57FA;&#x7840;&#x8BBE;&#x65BD;&#x6765;&#xFF0C;&#x5F53;&#x7136;&#x6211;&#x4EEC;&#x5B8C;&#x5168;&#x53EF;&#x4EE5;&#x53EA;&#x4F7F;&#x7528; Terraform &#x800C;&#x4E0D;&#x662F;&#x4F7F;&#x7528;&#x5B8C;&#x6574;&#x7684; HashiStack&#x3002;</p>
<p>HashiCorp &#x8FD9;&#x5BB6;&#x516C;&#x53F8;&#x6709;&#x4E00;&#x4E2A;&#x663E;&#x8457;&#x7279;&#x70B9;&#xFF0C;&#x5C31;&#x662F;&#x4ED6;&#x4EEC;&#x6781;&#x5176;&#x6709;&#x8010;&#x5FC3;&#xFF0C;&#x5E76;&#x4E14;&#x6781;&#x5176;&#x91CD;&#x89C6;&#x201C;&#x57FA;&#x7840;&#x8BBE;&#x65BD;&#x201D;&#x7684;&#x5EFA;&#x8BBE;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x4ED6;&#x4EEC;&#x5728;&#x601D;&#x8003; Terraform &#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x8BE5;&#x7528; JSON &#x8FD8;&#x662F; YAML &#x65F6;&#xFF0C;&#x5BF9;&#x4E24;&#x8005;&#x90FD;&#x4E0D;&#x6EE1;&#x610F;&#xFF0C;&#x6240;&#x4EE5;&#x4ED6;&#x4EEC;&#x5B81;&#x53EF;&#x6162;&#x4E0B;&#x6765;&#xFF0C;&#x82B1;&#x65F6;&#x95F4;&#x53BB;&#x8BBE;&#x8BA1;&#x4E86; HCL(<a href="https://github.com/hashicorp/hcl" target="_blank">HashiCorp Configuration Language</a>)&#xFF0C;&#x4F7F;&#x5F97;&#x4ED6;&#x4EEC;&#x5BF9;&#x4E8E;&#x58F0;&#x660E;&#x5F0F;&#x4EE3;&#x7801;&#x7684;&#x53EF;&#x8BFB;&#x6027;&#x6709;&#x4E86;&#x5B8C;&#x5168;&#x7684;&#x638C;&#x63A7;&#x529B;&#x3002;&#x518D;&#x6BD4;&#x5982;&#x5728;&#x4ED6;&#x4EEC;&#x8BBE;&#x8BA1; Terraform &#x4EE5;&#x53CA; Vault&#x3001;Packer &#x65F6;&#xFF0C;&#x4ED6;&#x4EEC;&#x4F7F;&#x7528;&#x7684; go &#x8BED;&#x8A00;&#x56E0;&#x4E3A;&#x662F;&#x628A;&#x5F15;&#x7528;&#x4EE3;&#x7801;&#x4E0B;&#x8F7D;&#x4E0B;&#x6765;&#x540E;&#x9759;&#x6001;&#x94FE;&#x63A5;&#x7F16;&#x8BD1;&#x6210;&#x5355;&#x4E00;&#x53EF;&#x6267;&#x884C;&#x6587;&#x4EF6;&#xFF0C;&#x6240;&#x4EE5;&#x4E0D;&#x50CF; jar &#x6216;&#x8005; dll &#x90A3;&#x6837;&#x6709;&#x8FD0;&#x884C;&#x65F6;&#x52A8;&#x6001;&#x52A0;&#x8F7D;&#x63D2;&#x4EF6;&#x7684;&#x80FD;&#x529B;&#x3002;&#x56E0;&#x6B64;&#x4ED6;&#x4EEC;&#x53C8;&#x82B1;&#x65F6;&#x95F4;&#x5F00;&#x53D1;&#x4E86; <a href="https://github.com/hashicorp/go-plugin" target="_blank">go-plugin</a> &#x8FD9;&#x4E2A;&#x9879;&#x76EE;&#xFF0C;&#x628A;&#x63D2;&#x4EF6;&#x7F16;&#x8BD1;&#x6210;&#x4E00;&#x4E2A;&#x72EC;&#x7ACB;&#x8FDB;&#x7A0B;&#xFF0C;&#x4E0E;&#x4E3B;&#x8FDB;&#x7A0B;&#x901A;&#x8FC7; rpc &#x8FDB;&#x884C;&#x4E92;&#x64CD;&#x4F5C;&#x3002;&#x8BE5;&#x9879;&#x76EE;&#x4E0A;&#x7684;&#x6295;&#x8D44;&#x5F88;&#x597D;&#x5730;&#x652F;&#x6491;&#x4E86; Terraform&#x3001;Vault&#x3001;Packer &#x9879;&#x76EE;&#x7684;&#x63D2;&#x4EF6;&#x673A;&#x5236;&#xFF0C;&#x8FDB;&#x800C;&#x6F14;&#x5316;&#x51FA;&#x5982;&#x4ECA;&#x767E;&#x82B1;&#x9F50;&#x653E;&#x7684; HashiCorp &#x5F00;&#x6E90;&#x751F;&#x6001;&#x3002;</p>
<p>&#x6211;&#x8FD9;&#x4E9B;&#x5E74;&#x9646;&#x9646;&#x7EED;&#x7EED;&#x5411;&#x5F88;&#x591A;&#x4EBA;&#x63A8;&#x8350;&#x8FC7; Terraform&#xFF0C;&#x5E76;&#x4E14;&#x5F88;&#x9AD8;&#x5174;&#x5730;&#x770B;&#x5230;&#x884C;&#x4E1A;&#x5185;&#x8D8A;&#x6765;&#x8D8A;&#x591A;&#x7684;&#x56E2;&#x961F;&#x5F00;&#x59CB;&#x8BA4;&#x53EF;&#x5E76;&#x91C7;&#x7EB3;&#xFF0C;&#x4F46;&#x662F;&#x524D;&#x4E0D;&#x4E45;&#x6211;&#x4ECD;&#x7136;&#x5341;&#x5206;&#x60CA;&#x8BB6;&#x5730;&#x610F;&#x8BC6;&#x5230;&#xFF0C;&#x7531;&#x4E8E; Terraform &#x5B98;&#x65B9;&#x5E76;&#x6CA1;&#x6709;&#x63D0;&#x4F9B;&#x4EFB;&#x4F55;&#x7684;&#x4E2D;&#x6587;&#x6587;&#x6863;&#xFF0C;&#x5BFC;&#x81F4;&#x4E86;&#x8BB8;&#x591A;&#x4E2D;&#x56FD;&#x4E92;&#x8054;&#x7F51;&#x4ECE;&#x4E1A;&#x8005;&#x6CA1;&#x6709;&#x8DB3;&#x591F;&#x7684;&#x52A8;&#x529B;&#x53BB;&#x5543;&#x5B8C;&#x6240;&#x6709;&#x82F1;&#x6587;&#x6587;&#x6863;&#x5E76;&#x4ED8;&#x8BF8;&#x5B9E;&#x8DF5;&#x3002;&#x8FD9;&#x5F53;&#x7136;&#x662F;&#x4E00;&#x4EF6;&#x975E;&#x5E38;&#x6B63;&#x5E38;&#x7684;&#x4E8B;&#x60C5;&#xFF0C;&#x5BF9;&#x56FD;&#x4EBA;&#x6765;&#x8BF4;&#x9605;&#x8BFB;&#x82F1;&#x6587;&#x6587;&#x6863;&#x6BD5;&#x7ADF;&#x6BD4;&#x8BFB;&#x4E2D;&#x6587;&#x7684;&#x6587;&#x6863;&#x8D39;&#x529B;&#x4E00;&#x4E9B;&#x3002;&#x5148;&#x8D24;&#x8BF4;&#xFF1A;&#x5C71;&#x4E0D;&#x6765;&#x5C31;&#x6211;&#xFF0C;&#x6211;&#x4FBF;&#x53BB;&#x5C31;&#x5C71;&#x3002;&#x65E2;&#x7136;&#x6211;&#x671F;&#x671B; Terraform &#x80FD;&#x5728;&#x4E2D;&#x56FD;&#x5F97;&#x5230;&#x66F4;&#x5927;&#x7684;&#x63A8;&#x5E7F;&#xFF0C;&#x90A3;&#x4E48;&#x6211;&#x5C31;&#x4E3A;&#x6B64;&#x505A;&#x4E00;&#x4E9B;&#x5DE5;&#x4F5C;&#xFF0C;&#x4E3A; Terraform &#x5199;&#x4E00;&#x4E2A;&#x5165;&#x95E8;&#x7EA7;&#x7684;&#x4E2D;&#x6587;&#x6559;&#x7A0B;&#xFF0C;&#x964D;&#x4F4E;&#x5B66;&#x4E60;&#x548C;&#x63A8;&#x5E7F;&#x7684;&#x96BE;&#x5EA6;&#x3002;</p>
<p>&#x8FD9;&#x4E2A;&#x6559;&#x7A0B;&#x53D7;&#x5230; <a href="https://www.hashicorp.com/certification/terraform-associate" target="_blank">HashiCorp Infrastructure Automation Certification</a> &#x7684;&#x542F;&#x53D1;&#xFF0C;&#x8FD9;&#x662F;&#x4E00;&#x4E2A; HashiCorp &#x51FA;&#x54C1;&#x7684; Terraform &#x8BA4;&#x8BC1;&#xFF0C;&#x662F;&#x4E00;&#x4E2A;&#x76F8;&#x5F53;&#x57FA;&#x7840;&#x7684;&#x8BA4;&#x8BC1;&#x8003;&#x8BD5;&#xFF0C;&#x5185;&#x5BB9;&#x6DB5;&#x76D6;&#x4E86; Terraform &#x6240;&#x6709;&#x7684;&#x5E38;&#x89C4;&#x64CD;&#x4F5C;&#x6280;&#x80FD;&#x3002;&#x901A;&#x8FC7;&#x8FD9;&#x95E8;&#x8BA4;&#x8BC1;&#x5E76;&#x4E0D;&#x80FD;&#x8BA9;&#x4F60;&#x6210;&#x4E3A;&#x4E00;&#x4E2A;&#x9AD8;&#x6548;&#x7684; Terraform &#x5F00;&#x53D1;&#x4EBA;&#x5458;&#xFF0C;&#x4F46;&#x53EF;&#x4EE5;&#x786E;&#x4FDD;&#x4F60;&#x88C5;&#x5907;&#x9F50;&#x5168;&#xFF0C;&#x62E5;&#x6709;&#x4E86;&#x8DB3;&#x591F;&#x5168;&#x9762;&#x7684;&#x77E5;&#x8BC6;&#x6765;&#x8FDB;&#x884C; Terraform &#x5B9E;&#x6218;&#x548C;&#x63A2;&#x7D22;&#x3002;</p>
<p>&#x8FD9;&#x4E2A;&#x6559;&#x7A0B;&#x57FA;&#x672C;&#x6309;&#x7167; Terraform &#x8BA4;&#x8BC1;&#x8003;&#x8BD5;&#x6240;&#x5217;&#x7684;<a href="https://learn.hashicorp.com/tutorials/terraform/associate-review?in=terraform/certification#review-guide" target="_blank">&#x8003;&#x7EB2;</a>&#x6765;&#x7F16;&#x5199;&#xFF0C;&#x7B2C;&#x4E09;&#x7AE0;&#x5230;&#x7B2C;&#x4E94;&#x7AE0;&#x5185;&#x5BB9;&#x4E3B;&#x8981;&#x662F;&#x7FFB;&#x8BD1;&#x5B98;&#x65B9;&#x6587;&#x6863;&#xFF0C;&#x76EE;&#x6807;&#x8BFB;&#x8005;&#x662F;((&#x5BF9;&#x201C;&#x57FA;&#x7840;&#x8BBE;&#x65BD;&#x5373;&#x4EE3;&#x7801;&#x201D;&#x4EE5;&#x53CA; Terraform &#x6709;&#x5174;&#x8DA3; || &#x538C;&#x5026;&#x4E86;&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#x4F9D;&#x9760;&#x5927;&#x91CF;&#x4F4E;&#x7EA7;&#x91CD;&#x590D;&#x70B9;&#x70B9;&#x70B9;&#x64CD;&#x4F5C;&#x4E91;) &amp;&amp; (&#x61D2;&#x5F97;&#x9605;&#x8BFB;&#x82F1;&#x6587;&#x6587;&#x6863;)) &#x7684;&#x4EBA;&#x3002;&#x5982;&#x679C;&#x4F60;&#x662F;&#x4E3A;&#x4E86;&#x786E;&#x8BA4; Terraform &#x67D0;&#x9879;&#x529F;&#x80FD;&#xFF0C;&#x6216;&#x662F;&#x4F60;&#x7684;&#x82F1;&#x8BED;&#x9605;&#x8BFB;&#x80FD;&#x529B;&#x8DB3;&#x591F;&#x597D;&#xFF0C;&#x8BF7;&#x76F4;&#x63A5;&#x6309;&#x7167;&#x8003;&#x7EB2;&#x53BB;&#x9605;&#x8BFB;&#x5B98;&#x65B9;&#x6587;&#x6863;&#xFF0C;&#x6BD5;&#x7ADF;&#x5B98;&#x65B9;&#x6587;&#x6863;&#x6700;&#x4E3A;&#x6743;&#x5A01;&#xFF0C;&#x66F4;&#x65B0;&#x4E5F;&#x6BD4;&#x8F83;&#x53CA;&#x65F6;&#x3002;&#x5047;&#x5982;&#x4F60;&#x53EA;&#x662F;&#x60F3;&#x5077;&#x4E2A;&#x61D2;&#xFF0C;&#x60F3;&#x901A;&#x8FC7;&#x5FEB;&#x901F;&#x6D4F;&#x89C8;&#x4E2D;&#x6587;&#x6587;&#x6863;&#x6765;&#x5BF9; Terraform &#x6709;&#x4E00;&#x4E2A;&#x5927;&#x6982;&#x7684;&#x4E86;&#x89E3;&#xFF0C;&#x90A3;&#x4E48;&#x8FD9;&#x4E2A;&#x6559;&#x7A0B;&#x5C31;&#x662F;&#x4E3A;&#x4F60;&#x51C6;&#x5907;&#x7684;&#x3002;&#x53E6;&#x5916;&#x5982;&#x679C;&#x6709;&#x670B;&#x53CB;&#x62C5;&#x5FC3;&#x5B66;&#x4E60;&#x66F2;&#x7EBF;&#x95EE;&#x9898;&#x7684;&#x8BDD;&#xFF0C;&#x8BF7;&#x4E0D;&#x7528;&#x62C5;&#x5FC3;&#xFF0C;Terraform &#x5728;&#x8BBE;&#x8BA1;&#x65F6;&#x5C31;&#x4E3A;&#x964D;&#x4F4E;&#x5B66;&#x4E60;&#x66F2;&#x7EBF;&#x505A;&#x4E86;&#x5927;&#x91CF;&#x5DE5;&#x4F5C;&#xFF0C;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x8BF4;&#xFF0C;&#x53EA;&#x8981;&#x4F60;&#x80FD;&#x591F;&#x770B;&#x61C2; JSON&#xFF0C;&#x90A3;&#x4E48;&#x5C31;&#x80FD;&#x8F7B;&#x677E;&#x638C;&#x63E1; Terraform&#x3002;</p>
<p>&#x53E6;&#x5916;&#x672C;&#x6559;&#x7A0B;&#x5728;&#x7F16;&#x5199;&#x8FC7;&#x7A0B;&#x4E2D;&#x53C2;&#x8003;&#x4E86; Terraform &#x8457;&#x540D;&#x6559;&#x6750; &#x2014;&#x2014; Yevgeniy Brikman &#x7F16;&#x7E82;&#x7684;&#x300A;Terraform Up &amp; Runnning&#x300B;&#xFF1A;</p>
<figure id="fig1.1.2"><img src="https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-12-23/1608689176373-image.png" alt="Terraform &#x8457;&#x540D;&#x6559;&#x6750;&#x300A;Terraform Up &amp; Running&#x300B;&#xFF0C;&#x5EFA;&#x8BAE;&#x76F4;&#x63A5;&#x9605;&#x8BFB;&#x7B2C;&#x4E8C;&#x7248;"><figcaption>&#x56FE; 1.1/2 - Terraform &#x8457;&#x540D;&#x6559;&#x6750;&#x300A;Terraform Up &amp; Running&#x300B;&#xFF0C;&#x5EFA;&#x8BAE;&#x76F4;&#x63A5;&#x9605;&#x8BFB;&#x7B2C;&#x4E8C;&#x7248;</figcaption></figure>
<p>&#x8FD9;&#x672C;&#x4E66;&#x662F;&#x76EE;&#x524D; Terraform &#x6700;&#x597D;&#x7684;&#x6559;&#x6750;&#xFF0C;&#x559C;&#x95FB;&#x7535;&#x5B50;&#x5DE5;&#x4E1A;&#x51FA;&#x7248;&#x793E;&#x5DF2;&#x4E8E; 2020 &#x5E74; 12 &#x6708;&#x51FA;&#x7248;&#xFF0C;&#x5EFA;&#x8BAE;&#x8BFB;&#x8005;&#x5728;&#x638C;&#x63E1;&#x4E86; Terraform &#x57FA;&#x7840;&#x77E5;&#x8BC6;&#x4EE5;&#x540E;&#x9605;&#x8BFB;&#x8BE5;&#x6559;&#x6750;&#xFF0C;&#x638C;&#x63E1;&#x66F4;&#x591A;&#x7684; Terraform &#x751F;&#x6001;&#x9AD8;&#x9636;&#x6280;&#x80FD;&#x3002;</p>
<p>&#x5BF9;&#x4E8E;&#x8FD9;&#x672C;&#x4E66;&#x6211;&#x518D;&#x5B89;&#x5229;&#x4E00;&#x4E0B;&#xFF0C;&#x76EE;&#x524D;&#x4E2D;&#x56FD;&#x4EBA;&#x53C2;&#x52A0; ACM(acm.org&#xFF0C;&#x8BA1;&#x7B97;&#x673A;&#x534F;&#x4F1A;)&#x5E74;&#x8D39;&#x6709;&#x6298;&#x6263;&#xFF0C;&#x6298;&#x4E0B;&#x6765;160+&#x4E00;&#x5E74;&#xFF0C;&#x53EF;&#x4EE5;&#x5728; <a href="https://learning.acm.org/" target="_blank">learning.acm.org</a> &#x4E0A;&#x8FDB;&#x5165; O&apos;REILLY &#x5728;&#x7EBF;&#x5B66;&#x4E60;&#x4E2D;&#x5FC3;&#x7545;&#x8BFB;&#x5927;&#x91CF; O&apos;REILLY &#x7684;&#x7535;&#x5B50;&#x4E66;&#xFF0C;&#x975E;&#x5E38;&#x5212;&#x7B97;&#xFF0C;&#x57FA;&#x672C;&#x8BFB;&#x4E24;&#x4E09;&#x672C;&#x5C31;&#x56DE;&#x672C;&#x4E86;&#x3002;&#x8FD9;&#x672C;&#x4E66;&#x4E5F;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x8FD9;&#x79CD;&#x65B9;&#x5F0F;&#x5728;&#x7EBF;&#x9605;&#x8BFB;&#x3002;</p>
<p>&#x6559;&#x7A0B;&#x7F16;&#x5199;&#x65F6; Terraform &#x7684;&#x4E3B;&#x529B;&#x7248;&#x672C;&#x662F; 0.13.5&#xFF1B;Terraform &#x63D0;&#x4F9B;&#x4E86; Macos&#x3001;Linux &#x4EE5;&#x53CA; Windows &#x7684;&#x53D1;&#x884C;&#x7248;&#xFF0C;&#x6240;&#x4EE5;&#x8BFB;&#x8005;&#x5B8C;&#x5168;&#x53EF;&#x4EE5;&#x81EA;&#x5DF1;&#x8DDF;&#x7740;&#x6559;&#x7A0B;&#x8FDB;&#x884C;&#x4E00;&#x4E9B;&#x7EC3;&#x4E60;&#x548C;&#x5B9E;&#x9A8C;&#x3002;</p>
<p>&#x53E6;&#x5916;&#xFF0C;Terraform &#x7684;&#x751F;&#x6001;&#x73AF;&#x5883;&#x5230;&#x4E86;&#x4ECA;&#x5929;&#xFF0C;&#x5DF2;&#x7ECF;&#x53D1;&#x5C55;&#x4E3A;&#x4E09;&#x4E2A;&#x5206;&#x652F;&#xFF0C;&#x5206;&#x522B;&#x662F;&#xFF1A;</p>
<ul>
<li>&#x5F00;&#x6E90;&#x7248;</li>
<li>Terraform Cloud &#x4E91;&#x670D;&#x52A1;&#x7248;</li>
<li>Terraform &#x4F01;&#x4E1A;&#x7248;</li>
</ul>
<p>&#x4E09;&#x4E2A;&#x7248;&#x672C;&#x4E4B;&#x95F4;&#x6709;&#x4E9B;&#x5FAE;&#x7684;&#x5DEE;&#x522B;&#xFF0C;&#x5305;&#x62EC;&#x5BF9;&#x540C;&#x4E00;&#x540D;&#x8BCD;(&#x4F8B;&#x5982; Workspace)&#x7684;&#x5B9A;&#x4E49;&#x90FD;&#x4F1A;&#x6709;&#x6240;&#x4E0D;&#x540C;&#x3002;&#x672C;&#x6559;&#x7A0B;&#x9488;&#x5BF9;&#x5F00;&#x6E90;&#x7248;&#x7F16;&#x5199;&#xFF0C;&#x6682;&#x4E0D;&#x6D89;&#x53CA;&#x4E91;&#x670D;&#x52A1;&#x7248;&#x4EE5;&#x53CA;&#x4F01;&#x4E1A;&#x7248;&#x3002;</p>
<p>&#x7279;&#x522B;&#x9E23;&#x8C22;<a href="https://github.com/yufeiminds" target="_blank">&#x674E;&#x5B87;&#x98DE;&#x540C;&#x5B66;</a>&#x4E3A;&#x672C;&#x4E66;&#x8FDB;&#x884C;&#x4E86;&#x975E;&#x5E38;&#x7EC6;&#x81F4;&#x7684;&#x6821;&#x5BF9;&#x5DE5;&#x4F5C;&#x3002;</p>
<p>&#x8BA9;&#x6211;&#x4EEC;&#x5F00;&#x59CB;&#x6211;&#x4EEC;&#x7684; Terraform &#x5165;&#x95E8;&#x4E4B;&#x65C5;&#x5427;&#x3002;</p>
<h2 id="2024-06-23-&#x7B2C;&#x4E8C;&#x7248;&#x66F4;&#x65B0;&#x58F0;&#x660E;"><a name="2024-06-23-&#x7B2C;&#x4E8C;&#x7248;&#x66F4;&#x65B0;&#x58F0;&#x660E;" class="anchor-navigation-ex-anchor" href="#2024-06-23-&#x7B2C;&#x4E8C;&#x7248;&#x66F4;&#x65B0;&#x58F0;&#x660E;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.1.1. 2024-06-23 &#x7B2C;&#x4E8C;&#x7248;&#x66F4;&#x65B0;&#x58F0;&#x660E;</h2>
<p>&#x4E0A;&#x8FF0;&#x5185;&#x5BB9;&#x4E3A;&#x672C;&#x7535;&#x5B50;&#x4E66;&#x521A;&#x5B8C;&#x6210;&#x65F6;&#x6240;&#x8457;&#xFF0C;&#x65F6;&#x5149;&#x834F;&#x82D2;&#xFF0C;&#x5149;&#x9634;&#x5982;&#x68AD;&#xFF0C;&#x4E00;&#x6643;&#x773C;&#x4E09;&#x5E74;&#x591A;&#x8FC7;&#x53BB;&#x4E86;&#xFF0C;HashiCorp &#x4E0A;&#x5E02;&#x4E86;&#xFF0C;&#x53C8;&#x88AB; IBM &#x6536;&#x8D2D;&#x4E86;&#xFF0C;Terraform &#x53D1;&#x5E03;&#x4E86; <code>v1.0</code>&#xFF0C;&#x7136;&#x540E;&#x9646;&#x9646;&#x7EED;&#x7EED;&#x66F4;&#x65B0;&#x5230;&#x4ECA;&#x5929;&#x7684; <code>v1.8.5</code>&#x3002;&#x5F88;&#x591A;&#x5185;&#x5BB9;&#x90FD;&#x53D1;&#x751F;&#x4E86;&#x53D8;&#x5316;&#xFF0C;&#x672C;&#x4E66;&#x6B63;&#x5728;&#x8FDB;&#x884C;&#x5927;&#x89C4;&#x6A21;&#x5185;&#x5BB9;&#x66F4;&#x65B0;&#xFF0C;&#x66F4;&#x65B0;&#x5DE5;&#x4F5C;&#x5C1A;&#x672A;&#x5B8C;&#x6210;&#xFF0C;&#x8BFB;&#x8005;&#x9605;&#x8BFB;&#x65F6;&#x656C;&#x8BF7;&#x7559;&#x610F;&#x5185;&#x5BB9;&#xFF0C;&#x4E0D;&#x4FBF;&#x4E4B;&#x5904;&#x5728;&#x6B64;&#x5148;&#x8D54;&#x793C;&#x4E86;&#x3002;</p>
<h2 id="2022-07-17-&#x9A6C;&#x9A70;&#x6392;&#x9664;&#x6761;&#x6B3E;"><a name="2022-07-17-&#x9A6C;&#x9A70;&#x6392;&#x9664;&#x6761;&#x6B3E;" class="anchor-navigation-ex-anchor" href="#2022-07-17-&#x9A6C;&#x9A70;&#x6392;&#x9664;&#x6761;&#x6B3E;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.1.2. 2022-07-17 &#x9A6C;&#x9A70;&#x6392;&#x9664;&#x6761;&#x6B3E;</h2>
<p>&#x672C;&#x7535;&#x5B50;&#x4E66;&#x4F7F;&#x7528; <a href="https://github.com/lonegunmanb/introduction-terraform/blob/gh-pages/LICENSE" target="_blank">CC-BY-SA-4.0 license</a> &#x6388;&#x6743;&#x53D1;&#x5E03;&#xFF0C;&#x8BFB;&#x8005;&#x53EF;&#x4EE5;&#x5728;&#x8BE5;&#x534F;&#x8BAE;&#x7684;&#x8BB8;&#x53EF;&#x8303;&#x56F4;&#x5185;&#x81EA;&#x7531;&#x9605;&#x8BFB;&#x3001;&#x5F15;&#x7528;&#x6216;&#x662F;&#x4F7F;&#x7528;&#x672C;&#x7535;&#x5B50;&#x4E66;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x4F46;&#x4EE5;&#x4E0B;&#x60C5;&#x51B5;&#x9664;&#x5916;&#xFF1A;</p>
<ol>
<li>&#x7981;&#x6B62;&#x540D;&#x4E3A;&#x201C;&#x9A6C;&#x9A70;&#x201D;&#x7684;&#x7279;&#x5B9A;&#x4E2A;&#x4EBA;&#x5B9E;&#x4F53;&#x9605;&#x8BFB;&#x3001;&#x5F15;&#x7528;&#x3001;&#x590D;&#x5236;&#x672C;&#x7535;&#x5B50;&#x4E66;&#x7684;&#x5185;&#x5BB9;</li>
<li>&#x7981;&#x6B62;&#x5728;&#x540D;&#x4E3A;&#x201C;&#x9A6C;&#x9A70;&#x201D;&#x7684;&#x7279;&#x5B9A;&#x4E2A;&#x4EBA;&#x5B9E;&#x4F53;&#x6240;&#x62E5;&#x6709;&#x7684;&#x4EFB;&#x4F55;&#x8BBE;&#x5907;&#x4E0A;&#x6253;&#x5F00;&#x3001;&#x4FDD;&#x5B58;&#x672C;&#x4E66;&#x7684;&#x5185;&#x5BB9;&#x6216;&#x662F;&#x79BB;&#x7EBF;&#x526F;&#x672C;&#x3001;&#x62F7;&#x8D1D;</li>
<li>&#x7981;&#x6B62;&#x540D;&#x4E3A;&#x201C;&#x9A6C;&#x9A70;&#x201D;&#x7684;&#x7279;&#x5B9A;&#x4E2A;&#x4EBA;&#x5B9E;&#x4F53;&#x6253;&#x5370;&#x3001;&#x6284;&#x5199;&#x672C;&#x4E66;&#x5185;&#x5BB9;&#xFF0C;&#x6216;&#x662F;&#x4FDD;&#x6709;&#x672C;&#x4E66;&#x5185;&#x5BB9;&#x7684;&#x975E;&#x6570;&#x5B57;&#x5316;&#x526F;&#x672C;&#xFF08;&#x5305;&#x542B;&#x5E76;&#x4E0D;&#x9650;&#x4E8E;&#x4E66;&#x7C4D;&#x3001;&#x624B;&#x6284;&#x672C;&#x3001;&#x7167;&#x7247;&#x7B49;&#xFF09;</li>
<li>&#x7981;&#x6B62;&#x5728;&#x4E0E;&#x540D;&#x4E3A;&#x201C;&#x9A6C;&#x9A70;&#x201D;&#x7684;&#x7279;&#x5B9A;&#x4E2A;&#x4EBA;&#x5B9E;&#x4F53;&#x6709;&#x52B3;&#x52A8;&#x5173;&#x7CFB;&#x3001;&#x80A1;&#x6743;&#x5173;&#x7CFB;&#xFF0C;&#x6216;&#x662F;&#x4E0E;&#x5176;&#x76F4;&#x7CFB;&#x4EB2;&#x5C5E;&#x6709;&#x5173;&#x8054;&#x7684;&#x4F01;&#x4E1A;&#x3001;&#x56E2;&#x4F53;&#x6240;&#x62E5;&#x6709;&#x7684;&#x4EFB;&#x4F55;&#x7535;&#x5B50;&#x8BBE;&#x5907;&#x4E0A;&#x6253;&#x5F00;&#x3001;&#x4FDD;&#x5B58;&#x672C;&#x7535;&#x5B50;&#x4E66;&#x7684;&#x5185;&#x5BB9;&#x6216;&#x662F;&#x79BB;&#x7EBF;&#x526F;&#x672C;&#x3001;&#x62F7;&#x8D1D;</li>
</ol>
<p>&#x4EE5;&#x4E0A;&#x60C5;&#x51B5;&#x5747;&#x4F1A;&#x88AB;&#x89C6;&#x4E3A;&#x4FB5;&#x6743;&#x884C;&#x4E3A;&#x3002;&#x82E5;&#x8BFB;&#x8005;&#x540D;&#x4E3A;&#x201C;&#x9A6C;&#x9A70;&#x201D;&#xFF0C;&#x4F46;&#x4E0D;&#x77E5;&#x9053;&#x81EA;&#x5DF1;&#x662F;&#x5426;&#x662F;&#x8BE5;&#x6761;&#x6B3E;&#x6240;&#x7981;&#x6B62;&#x7684;&#x7279;&#x5B9A;&#x201C;&#x9A6C;&#x9A70;&#x201D;&#x4E2A;&#x4EBA;&#x5B9E;&#x4F53;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;<a href="https://github.com/lonegunmanb/introduction-terraform" target="_blank">&#x672C;&#x4E66; GitHub &#x4ED3;&#x5E93;</a> &#x4E2D;&#x63D0;&#x4EA4; issue &#x4E0E;&#x4F5C;&#x8005;&#x786E;&#x8BA4;&#x3002;</p>
<p>&#x5BF9;&#x672C;&#x7535;&#x5B50;&#x4E66;&#x7684;&#x590D;&#x523B;&#xFF08;Fork&#xFF09;&#x4EE5;&#x53CA;&#x518D;&#x521B;&#x4F5C;&#x9075;&#x5FAA; CC-BY-SA-4.0 License &#x76F8;&#x5173;&#x89C4;&#x5B9A;&#xFF0C;&#x4F46;&#x4E0D;&#x5141;&#x8BB8;&#x53BB;&#x9664;&#x672C;&#x6761;&#x6B3E;&#x5185;&#x5BB9;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="1.Terraform初步体验.html" class="navigation navigation-next navigation-unique" aria-label="Next page: Terraform 初步体验">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Introduction","level":"1.1","depth":1,"next":{"title":"Terraform 初步体验","level":"1.2","depth":1,"path":"1.Terraform初步体验.md","ref":"./1.Terraform初步体验.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-highlight","prism","prism-themes","fontsettings","sharing","-lunr","-search","search-pro","livereload","image-captions","sitemap-general","anchor-navigation-ex"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"css":["prism-themes/themes/prism-vsc-dark-plus.css"],"lang":{"shell":"bash","cmd":"bash"}},"livereload":{},"search-pro":{},"sitemap-general":{"prefix":"https://lonegunmanb.github.io/introduction-terraform/"},"fontsettings":{"family":"sans","size":2,"theme":"white"},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"prism-themes":{},"sharing":{"all":["facebook","google","twitter","weibo","instapaper"],"facebook":true,"google":false,"instapaper":false,"twitter":true,"vk":false,"weibo":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true},"image-captions":{"caption":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","variable_name":"_pictures"}},"theme":"default","author":"大可不加冰","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"_pictures":[{"backlink":"index.html#fig1.1.1","level":"1.1","list_caption":"Figure: Nomad、Consul、Vault、Terraform 组成的 HashiStack","alt":"Nomad、Consul、Vault、Terraform 组成的 HashiStack","nro":1,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-11-13/1605243540985-image.png","index":1,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"Nomad、Consul、Vault、Terraform 组成的 HashiStack","attributes":{},"skip":false,"key":"1.1.1"},{"backlink":"index.html#fig1.1.2","level":"1.1","list_caption":"Figure: Terraform 著名教材《Terraform Up & Running》，建议直接阅读第二版","alt":"Terraform 著名教材《Terraform Up & Running》，建议直接阅读第二版","nro":2,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-12-23/1608689176373-image.png","index":2,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"Terraform 著名教材《Terraform Up & Running》，建议直接阅读第二版","attributes":{},"skip":false,"key":"1.1.2"},{"backlink":"./2.1.Terraform基础概念——Provider.html#fig1.3.1.1","level":"1.3.1","list_caption":"Figure: Terraform通过RPC调用插件，插件代码通过调用SDK操作远程资源","alt":"Terraform通过RPC调用插件，插件代码通过调用SDK操作远程资源","nro":3,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-11-16/1605496195438-image.png","index":1,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"Terraform通过RPC调用插件，插件代码通过调用SDK操作远程资源","attributes":{},"skip":false,"key":"1.3.1.1"},{"backlink":"./2.1.Terraform基础概念——Provider.html#fig1.3.1.2","level":"1.3.1","list_caption":"Figure: registry.terraform.io上的插件页面","alt":"registry.terraform.io上的插件页面","nro":4,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-11-19/1605799350775-image.png","index":2,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"registry.terraform.io上的插件页面","attributes":{},"skip":false,"key":"1.3.1.2"},{"backlink":"./2.1.Terraform基础概念——Provider.html#fig1.3.1.3","level":"1.3.1","list_caption":"Figure: registry.terraform.io的搜索页面","alt":"registry.terraform.io的搜索页面","nro":5,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-11-16/1605498907942-image.png","index":3,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"registry.terraform.io的搜索页面","attributes":{},"skip":false,"key":"1.3.1.3"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.1","level":"1.3.2","list_caption":"Figure: Consul的GUI界面","alt":"Consul的GUI界面","nro":6,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240220224455.png","index":1,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"Consul的GUI界面","attributes":{},"skip":false,"key":"1.3.2.1"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.2","level":"1.3.2","list_caption":"Figure: Consul 中可以看到名为 `localstack-aws` 的键","alt":"Consul 中可以看到名为 `localstack-aws` 的键","nro":7,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240220230042.png","index":2,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"Consul 中可以看到名为 `localstack-aws` 的键","attributes":{},"skip":false,"key":"1.3.2.2"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.3","level":"1.3.2","list_caption":"Figure: 键的内容","alt":"键的内容","nro":8,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240220230136.png","index":3,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"键的内容","attributes":{},"skip":false,"key":"1.3.2.3"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.4","level":"1.3.2","list_caption":"Figure: 键依然存在","alt":"键依然存在","nro":9,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240220230312.png","index":4,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"键依然存在","attributes":{},"skip":false,"key":"1.3.2.4"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.5","level":"1.3.2","list_caption":"Figure: 内容已被清空","alt":"内容已被清空","nro":10,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240220230350.png","index":5,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"内容已被清空","attributes":{},"skip":false,"key":"1.3.2.5"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.6","level":"1.3.2","list_caption":"Figure: 多了一个同名的文件夹","alt":"多了一个同名的文件夹","nro":11,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225100309.png","index":6,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"多了一个同名的文件夹","attributes":{},"skip":false,"key":"1.3.2.6"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.7","level":"1.3.2","list_caption":"Figure: localstack-aws 文件夹内部","alt":"localstack-aws 文件夹内部","nro":12,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225100354.png","index":7,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"localstack-aws 文件夹内部","attributes":{},"skip":false,"key":"1.3.2.7"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.8","level":"1.3.2","list_caption":"Figure: `.lock` 内容","alt":"`.lock` 内容","nro":13,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225180803.png","index":8,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"`.lock` 内容","attributes":{},"skip":false,"key":"1.3.2.8"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.9","level":"1.3.2","list_caption":"Figure: `.lockinfo` 内容","alt":"`.lockinfo` 内容","nro":14,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225180852.png","index":9,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"`.lockinfo` 内容","attributes":{},"skip":false,"key":"1.3.2.9"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.10","level":"1.3.2","list_caption":"Figure: 重新访问Consul","alt":"重新访问Consul","nro":15,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225101100.png","index":10,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"重新访问Consul","attributes":{},"skip":false,"key":"1.3.2.10"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.11","level":"1.3.2","list_caption":"Figure: 将代码复制到不同的文件夹中保存","alt":"将代码复制到不同的文件夹中保存","nro":16,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-11-17/1605571444613-image.png","index":11,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"将代码复制到不同的文件夹中保存","attributes":{},"skip":false,"key":"1.3.2.11"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.12","level":"1.3.2","list_caption":"Figure: 重新访问 Consul，目前有一个键","alt":"重新访问 Consul，目前有一个键","nro":17,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225174932.png","index":12,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"重新访问 Consul，目前有一个键","attributes":{},"skip":false,"key":"1.3.2.12"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.13","level":"1.3.2","list_caption":"Figure: Consul 中多了一个 `localstack-aws-env:feature1`","alt":"Consul 中多了一个 `localstack-aws-env:feature1`","nro":18,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225175538.png","index":13,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"Consul 中多了一个 `localstack-aws-env:feature1`","attributes":{},"skip":false,"key":"1.3.2.13"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.14","level":"1.3.2","list_caption":"Figure: 此时 `localstack-aws-env:feature1` 的内容","alt":"此时 `localstack-aws-env:feature1` 的内容","nro":19,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225175806.png","index":14,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"此时 `localstack-aws-env:feature1` 的内容","attributes":{},"skip":false,"key":"1.3.2.14"},{"backlink":"./2.2.Terraform基础概念——状态管理.html#fig1.3.2.15","level":"1.3.2","list_caption":"Figure: `localstack-aws-env:feature1` 被删除了","alt":"`localstack-aws-env:feature1` 被删除了","nro":20,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/20240225180126.png","index":15,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"`localstack-aws-env:feature1` 被删除了","attributes":{},"skip":false,"key":"1.3.2.15"},{"backlink":"./5.10.graph.html#fig1.6.10.1","level":"1.6.10","list_caption":"Figure: 生成的依赖图","alt":"生成的依赖图","nro":21,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2020-11-25/1606272727693-image.png","index":1,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"生成的依赖图","attributes":{},"skip":false,"key":"1.6.10.1"},{"backlink":"8.CloudPosse最佳实践.html#fig1.9.1","level":"1.9","list_caption":"Figure: Terraform 输出值的命名要对称","alt":"Terraform 输出值的命名要对称","nro":22,"url":"https://raw.githubusercontent.com/lonegunmanb/introduction-to-terraform-pic/master/2021-11-28/1638086002974-image.png","index":1,"caption_template":"图 _PAGE_LEVEL_/_PAGE_IMAGE_NUMBER_ - _CAPTION_","label":"Terraform 输出值的命名要对称","attributes":{},"skip":false,"key":"1.9.1"}]},"title":"《Terraform入门教程》","gitbook":"*"},"file":{"path":"README.md","mtime":"2024-06-23T13:37:48.976Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2024-06-24T12:39:39.308Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    

    </body>
</html>

